import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import store from './store'
import Fragment from 'vue-fragment'


Vue.config.productionTip = false
Vue.use(ElementUI)
import MessageUtils from '../src/utils/MessageUtils'
Vue.prototype.$message = MessageUtils

Vue.use(Fragment.Plugin)
router.beforeEach((to,from,next)=>{
  //获取tabs
  store.commit("getTabs")
  //设置当前选中的tabs
  store.commit("setActiveTabs",to.name)
  next()
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
